package com.mingyizhudao.app.view.mine;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

import com.mingyizhudao.app.R;

public class CallActivity extends Activity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_call);
		getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
	}
	
	@Override
	public boolean onTouchEvent(MotionEvent event) {
		finish();
		return true;
	}
	
	public void doCall(View view){
		TextView callNum = (TextView)findViewById(R.id.btn_call);
		Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+callNum.getText().toString()));    
        startActivity(intent);  
	}
}
